what is spore formation